<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\View;

class ShareIndexDataProvider extends ServiceProvider
{
    /**
     * Bootstrap the application services.
     *
     * @return void
     */
    public function boot()
    {   
        //为首页的模板视图绑定视图合成器
        View::composer([
            'Home/List/ListBySearchGoods',      
            'Home/List/ListByCategory',      
            // 'Home/Index/index',
            'Home/Layout/index_nav',
            'Home/Layout/topper',
            'Home/Layout/footer',
            'Home/Layout/search',
            'Home/Index/aside_nav',
            'Home/Index/home_promotion',
            'Home/Index/home_hotsale',
            ], 'App\Http\ViewComposers\IndexComposer');

    }


    /**
     * Register the application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}
